<?php
 
#session_save_path("/users/home80/e0525580");
#session_set_cookie_params('3600', 'e0525580');
session_start();

define('LOG_FILE_NAME', 'mylog.log');

require_once('persistence/_table_names.php');
require_once('configuration/Configuration.class.php');
require_once('log/Log.class.php');

function isLoggedIn() {
	return isset($_SESSION['jsug_loggedin']);
}

function setLoggedIn($isTrue) {
	if($isTrue) {
		$_SESSION['jsug_loggedin'] = 1;
	} else { // actually, not yet used because there is no UserLogoutRequest
		unset($_SESSION['jsug_loggedin']);
	}
}

function wrapCData($string) {
	return '<![CDATA[' . $string . ']]>';
}

function unixToMySQL($timestamp) {
    return date('Y-m-d H:i:s', $timestamp);
}

// TODO get rid of that method
function errorHandle(&$db) {
	echo "ERROR!!!\n";
	var_dump($db->errorInfo());
	$db = null;
	exit;
}


?>